package com.itheima.put;

public class Temp {
    public static void main(String[] args) {
        String s = "123456";
        int i = s.indexOf("2");
        int i1 = s.indexOf("5");
        String substring = s.substring(i + 1, i1);
        System.out.println(substring);

    }
}
